import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

// 因为要存储时间到cookies里面
const Time = 'token_time'

export function getTokenTime() {
  return Cookies.get(Time)
}

export function setTokenTime(token_first_time) {
  return Cookies.set(Time, token_first_time)
}

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
